<?php
/* @var $this OrderController */
/* @var $model Order */
/* @var $form CActiveForm */
?>
<div class="accordion zyBorder01" id="search-form">
	<div class="accordion-group zyBorder0 well">
		<div id="collapseOne" class="accordion-body collapse" style="height: 0px;">
			<div class="accordion-inner zyBorder0">
<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
		)); ?>
	<div class="row-fluid">
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->label($model,'orderNo'); ?>
					<div class="controls span7">
						<?php echo $form->textField($model,'orderNo',array('size'=>60,'maxlength'=>255)); ?>
					</div>
			</div>
		</div>
				<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->label($model,'contract'); ?>
					<div class="controls span7">
						<?php echo $form->textField($model,'contract',array('size'=>60,'maxlength'=>255)); ?>
					</div>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->label($model,'first_name'); ?>
					<div class="controls span7">
						<?php echo $form->textField($model,'first_name',array('size'=>60,'maxlength'=>255)); ?>
					</div>
			</div>
		</div>
	<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->label($model,'last_name'); ?>
					<div class="controls span7">
						<?php echo $form->textField($model,'last_name',array('size'=>60,'maxlength'=>255)); ?>
					</div>
			</div>
		</div>
	</div>
	<div class="row-fluid">
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->label($model,'mobile'); ?>
					<div class="controls span7">
						<?php echo $form->textField($model,'mobile',array('size'=>60,'maxlength'=>255)); ?>
					</div>
			</div>
		</div>
		<div class="span6">
			<div class="form-row control-group row-fluid">
				<?php echo $form->label($model,'create_time'); ?>
					<div class="controls span7">
					<input type="text" id="create_time1" name="Nbnorder[create_time]" size="10" value="<?php echo date("Y-m-d",strtotime("-7 day"));?>" onClick="WdatePicker({startDate:'%y-%M-01',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})" " style="width:130px;" />
  				<?php echo Yii::t('base','TO');?>
  				<input type="text" id="create_time2" name="create_time" size="10" value="<?php echo date("Y-m-d");?>" onClick="WdatePicker({startDate:'%y-%M-01',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})" " style="width:130px;" /> 		
					</div>
			</div>
		</div>
	</div>
</div>
	<div class="form-actions row-fluid" style="margin-bottom:0; padding:5px;">
    	<div class="span12">
			<?php echo CHtml::submitButton('Search',array('class'=>'btn btn-secondary zyBtn02')); ?>
        	<button class="btn btn-link zyBtn04" rel="tooltip" data-placement="left" data-original-title="<?php echo Yii::t('common','You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.');?>"><?php echo Yii::t('common','Explanation');?></button>
        </div>
    </div>
				<?php $this->endWidget(); ?>
		</div>
	</div>
</div>
<?php 
//$arr=Yii::t('base','The first value cannot be less than second value');
Yii :: app()->clientScript->registerScript('search', "
		$('.zyBtn02').click(function(){
		if($('#create_time1').val()>$('#create_time2').val())
		{
			alert('".Yii::t('base','The first value cannot be less than second value')."');
			$('#create_time1').focus();
			return false;
		}
			
		});
		");
?>